package com.qianbei.view.bluetooth;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * <pre>
 *     author : pipi
 *     e-mail : xxx@xx
 *     time   : 2018/09/29
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class BTDevice implements Parcelable {
    private String name;
    private String addr;
    private String rssi;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getRssi() {
        return rssi;
    }

    public void setRssi(String rssi) {
        this.rssi = rssi;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.addr);
        dest.writeString(this.rssi);
    }

    public BTDevice() {
    }

    protected BTDevice(Parcel in) {
        this.name = in.readString();
        this.addr = in.readString();
        this.rssi = in.readString();
    }

    public static final Parcelable.Creator<BTDevice> CREATOR = new Parcelable.Creator<BTDevice>() {
        @Override
        public BTDevice createFromParcel(Parcel source) {
            return new BTDevice(source);
        }

        @Override
        public BTDevice[] newArray(int size) {
            return new BTDevice[size];
        }
    };
}
